using System.ComponentModel;
using System.Windows;

namespace CodeBadger.GasMileage.ViewModels
{
    public abstract class ViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        protected App CurrentApp
        {
            get { return (App) Application.Current; }
        }

        protected void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged == null) return;
            PropertyChanged(null, new PropertyChangedEventArgs(propertyName));
        }
    }
}